layui.use(['layer', 'form','table'], function() {
    const layer = layui.layer;
    const $ = layui.$;
    const table = layui.table;
    const form = layui.form;

    let data = form.val("unLinkUserForm");

    let addUserTab = table.render({
        elem: '#addUserTab',
        url: '/activiti/group/unLinkUserlist', //数据接口
        page: false,
        where: data,
        height:300,
        cols: [[ //表头
            {type: 'checkbox', title: '选择', width:80, fixed: 'left'},
            {field: 'id', title: '用户ID', width:150, fixed: 'left'},
            {field: 'firstName', title: '用户名'},
            {field: 'lastName', title: '中文名'}
        ]],
        parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
            return {
                "code": res.code, //返回状态码
                "msg": res.msg, //解析提示信息
                "data": res.data //解析数据列表
            };
        }
    });


    form.on('submit(query)',function(data){
        addUserTab.reload({
            where: data.field
        });
        return false;
    });


});